package com.heima.apis.wemedia;

import com.heima.model.admin.dtos.NewsAuthDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.AdWmChannelDto;
import com.heima.model.wemedia.dtos.SensitiveDto;
import com.heima.model.wemedia.dtos.WmChannelDto;
import com.heima.model.wemedia.pojos.WmChannel;
import com.heima.model.wemedia.pojos.WmSensitive;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("leadnews-wemedia")
public interface IWeMediaClient {

    /**
     * Feign接口查看频道列表
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/admin/list")
    public ResponseResult list(@RequestBody AdWmChannelDto dto);

    /**
     * Feign接口保存频道
     * @param wmChannel
     * @return
     */
    @PostMapping("/api/v1/admin/save")
    public ResponseResult saveChannel(@RequestBody WmChannelDto wmChannel);

    /**
     * 更新频道
     * @param wmChannelDto
     * @return
     */
    @PostMapping("/api/v1/admin/update")
    public ResponseResult updateChannel(@RequestBody WmChannelDto wmChannelDto);

    /**
     * 删除频道
     * @param id
     * @return
     */
    @GetMapping("/api/v1/admin/del/{id}")
    public ResponseResult delChannel(@PathVariable Integer id);
    /**
     * @description:查询敏感词
     * @author: clc
     * @date: 2023/2/7 19:00
     **/
    @PostMapping("/api/v1/sensitive/list")
    ResponseResult findSensitive(@RequestBody SensitiveDto dto);

    /**
     * @description:保存敏感词
     * @author: clc
     * @date: 2023/2/7 19:00
     **/
    @PostMapping("/api/v1/sensitive/save")
    ResponseResult saveSensitive(@RequestBody WmSensitive wmSensitive);

    /**
     * @description:删除敏感词
     * @author: clc
     * @date: 2023/2/7 19:00
     **/
    @DeleteMapping("/api/v1/sensitive/del/{id}")
    ResponseResult deleteSensitive(@PathVariable Integer id);

    /**
     * @description:修改敏感词
     * @author: clc
     * @date: 2023/2/7 19:00
     **/
    @PostMapping("/api/v1/sensitive/update")
    ResponseResult updateSensitive(@RequestBody WmSensitive wmSensitive);

    /**
     * Feign接口自媒体人工审核
     * @param newsAuthDto
     * @return
     */
    @PostMapping("/api/v1/news/list_vo")
    public ResponseResult wmCheckPageList(@RequestBody NewsAuthDto newsAuthDto);


    @PostMapping("/api/v1/news/one_vo/{id}")
    ResponseResult detail(@PathVariable Integer id);

    @PostMapping("/api/v1/news/auth_fail")
    ResponseResult checkFail(@RequestBody NewsAuthDto newsAuthDto);

    @PostMapping("/api/v1/news/auth_pass")
    ResponseResult checkPass(@RequestBody NewsAuthDto newsAuthDto);

    @PostMapping("/api/v1/comment/scan")
    ResponseResult commentScan();

}
